import { nextTick } from 'vue';
import { useFormItem } from 'element-plus';
function useElFormItem() {
	const { formItem } = useFormItem(); // form formItem
	const emitTrigger = () => {
		if (formItem) {
			nextTick(() => {
				formItem.validate('blur'); // 触发校验
				formItem.validate('change'); // 触发校验
			});
		}
	};
	return { formItem, emitTrigger };
}
export default useElFormItem;
